<template>
  <div class="footer w100 mt30">
    <div class="footer_con content_w bc">
      <div class="links">
        <b>LINK</b>
        <p>
          <select class="links" v-for="item in webLinks" @change="linkChange">
            <option>{{item.name}}</option>
            <option v-for="option in item.links" :value="option.linkUrl">{{option.linkName}}</option>
          </select>
        </p>
      </div>
      <div class="footer_nav fl">
        <div class="item">
          <ul>
            <li><span class="t">关于我们</span></li>
            <li><a href="/group/index/qygk">企业概况</a></li>
            <li><a href="/group/index/zzjg">组织结构</a></li>
            <li><a href="/group/index/lxwm">联系我们</a></li>
            <li><a href="/group/index/gjln" class="a_hover">公交理念 </a></li>
            <li><a href="/item/index/20149718296378?pid=20141635171633" class="a_hover">公交之星</a></li>
          </ul>
        </div>
        <div class="item">
          <ul>
            <li><span class="t">新闻公告 </span></li>
            <li>
              <a href="/item/index/20145161029284?pid=712a95df750c40a48854e25c95bfaa65" class="a_hover">企业公示</a>
            </li>
            <li>
              <a href="/item/index/20145840520781?pid=712a95df750c40a48854e25c95bfaa65" class="a_hover">企业新闻</a>
            </li>
            <li>
              <a href="/item/index/20148453315943?pid=712a95df750c40a48854e25c95bfaa65" class="a_hover">线路公告</a>
            </li>
            <li>
              <a href="/item/index/20142591516011?pid=712a95df750c40a48854e25c95bfaa65" class="a_hover">公交文苑</a>
            </li>
            <li>
              <a href="/item/index/e26b0e2562d048eebb7672430e237edf?pid=712a95df750c40a48854e25c95bfaa65"
                 class="a_hover">公交报</a>
            </li>
          </ul>
        </div>
        <div class="item">
          <ul>
            <li><span class="t">公交服务</span></li>
            <li><a href="/item/index/ff91512cc8fb4dd0891b1c6c25815889?pid=8c6e3aa36afd46a6904b0747fb1b2038"
                   class="a_hover">乘车须知</a></li>
          </ul>
        </div>
        <div class="item">
          <ul>
            <li><span class="t">公交旅游</span></li>
            <li>
              <router-link to="/tour">旅游线路推荐</router-link>
            </li>
          </ul>
        </div>
      </div>

      <div class="cb"></div>
      <div class="bq">
        <span>西安市公共交通集团有限公司 版权所有 - 2020  </span>
        <!--<a href="employee.asp">职工专区</a></div>-->
      </div>
      <div style="text-align: center">
        <a target='_blank' href='#'>
          <img src='@img/wlgs.gif'>
        </a>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    name: "BaseFooter",
    methods: {
      linkChange(e) {
        if (e.target.selectedOptions.length === 0) {
          return;
        }
        let selectValue = e.target.selectedOptions[0].value;
        if (!(/^http/.test(selectValue))) {//不是已http开头则不跳转
          return;
        }
        window.open(selectValue);
      }
    },
    data() {
      return {
        webLinks:[]
      }
    },
    async created() {
      this.webLinks = await this.$api.webLink.findList();
    }
  }
</script>